<!-- application/index/view/index/index.html -->

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>知鸟AI-论文管理中心</title>
    
    <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/theme/css/iconfont.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/extra/style.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/zhiniao/css/index.css?at={:date('md')}">

</head>
<body>
<div class="layui-container">

<!-- 导航栏 -->
<div class="layui-layout layui-layout-admin ">
    {include file="index/header"}

    <div class="manage-body">

        <table class="layui-table">
            <colgroup>
                <col width="30">
                <col width="300">
                <col width="150">
                <col width="400">
                <col width="200">
                <col width="150">
                <col width="100">
            </colgroup>
            <thead>
                    <tr>
                        <th>id</th>
                        <th>标题</th>
                        <th>创建时间</th>
                        <th>执行时间</th>
                        <th>状态</th>
                        <th>下载</th>
                        <th>日志</th>
                    </tr>
                    {volist name="list" id="item" key="key"}
                    <tr>
                        <td>{$item.document_id}</td>
                        <td>{$item.title}</td>
                        <td>{$item.create_time}</td>
                        <td>
                            <div class="queue-status-box">
                                <p class="queue-status-des">
                                    {$item.queue.exec_time} ( {$item.queue.outer_time} ) <br/>已执行 <span class="rscript">{$item.queue.rscript}</span> 次
                                </p>
                            </div>
                        </td>
                        <td>
                            {if $item.queue.status == 0}
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-gray">未知</span>
                                {elseif $item.queue.status == 1}
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-black">等待</span>
                                {elseif $item.queue.status == 2}
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-blue">执行中</span>
                                {elseif $item.queue.status == 3}
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-green">完成</span>
                                {elseif $item.queue.status == 4}
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-red">失败</span>
                            {/if}
                        </td>
                        <td>
                            {if $item.file_url }
                                
                                <span class="pull-left layui-badge layui-badge-middle layui-bg-green"><a style="color:
                                #ffffff;" href="{$item.file_url}">点击下载</a></span>
                            {else}
                            <span class="pull-left layui-badge layui-badge-middle layui-bg-black">等待完成</span>
                            {/if}
                        </td>
                        <th><a class='layui-btn layui-btn-sm layui-btn-normal' onclick="$.loadQueue('{$item.queue_code}',false,this)">日 志</a></th>
                    </tr>
                {/volist}
            </thead>
            <tbody>
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>

</div>
<script src="__ROOT__/static/plugs/layui/layui.js"></script>
<script src="__ROOT__/static/plugs/require/require.js"></script>
<script src="__ROOT__/static/admin.js"></script>
<script src="__ROOT__/static/extra/script.js"></script>
<script>
    layui.use(['form'], function(){
        var form = layui.form;
    });
</script>
</body>
</html>